package com.Guo.system.service;

import com.Guo.system.entity.User;
import com.Guo.system.vo.UserVO;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author Guo
 * @since 2020-12-01
 */
public interface UserService extends IService<User> {
    Page<User> findUserPage(@Param("page") Page<User> page, @Param("userVO") UserVO userVO);

    User binding(@Param("id")Long id);

    /**
     * 添加用户
     * @param user
     */
    void addUser(User user);

    /**
     * 导出用户Excel
     * @param response
     * @param tbUsers
     * @throws IOException
     */
    void exportUserExcel(HttpServletResponse response, List<User> tbUsers) throws IOException;


    /**
     * 根据用户名查询用户
     *
     * @param userName
     * @return
     */
    User selectByName(String userName);

}
